using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;

using Google.GData.YouTube;
using DDNY.WebPortals.Common;

namespace ShopzillaV1.Controllers
{
    public class VideoController : ApplicationController
    {
        //
        // GET: /Video/

        public ActionResult List(string id, string page)
        {
         

            List<YouTubeEntry> movies = YoutubeHelper.FindVideoEntriesByKeyWord("TODO");
            ViewData[VDConstants.CurrentASIN] = id;
            //ViewData[VDConstants.PageTitle] = "Video Results For " + product.ItemAttributes.Title;
            return View(movies);
        }

        public ActionResult Show(string id, string page)
        {
           // Item product = AmazonHelper.GetProductDetail(id);

            List<YouTubeEntry> movies = YoutubeHelper.FindVideoEntriesByKeyWord("TODO");
            ViewData[VDConstants.CurrentASIN] = id;
            YouTubeEntry video = movies.Single(a => a.VideoId == page);
            ViewData[VDConstants.PageTitle] = video.Title.Text;
            ViewData[VDConstants.ShouldIndex] = "NOINDEX";
           // ViewData[VDConstants.ProductToShow] = product;
            return View(video);
          
        }

    }
}
